<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
	import="com.ffcs.crmd.platform.ui.utils.JspUtil"%>
<!DOCTYPE html>
<jsp:include page="/resources/theme/default/include/default-header-inc.jsp"></jsp:include>
<jsp:include page="/resources/theme/default/include/default-footer-inc.jsp"></jsp:include>
<html>
<head>
	<title>员工管理</title>
	<script type="text/javascript" src="../sys-service.js"></script>
	<script type="text/javascript" src="./user-controller.js"></script>
</head>
<body ng-app="catalogManagerApp" ng-controller="catalogManagerCtrl" style="background-color: transparent;">
	<div class="container-fluid content">
		<div class="page-left-layout" style="margin-top: 12px;">
			<div class="panel">
				<div class="panel-heading">
					<i class="mark"></i>用户目录
				</div>
				<div class="panel-body">
					<div id="toolbar" class="btn-group">
						<button id="addUserOrgButton" class="btn btn-sm btn-blue" data-toggle="modal" data-target="#userOrgEditModal">
							<i class="glyphicon glyphicon-plus"></i>
						</button>
						<button id="removeUserOrgButton" class="btn btn-sm btn-blue" ng-click="deleteOrg();" disabled>
							<i class="glyphicon glyphicon-remove"></i>
						</button>
					</div>
					<div>
						<div jstree 
							tree-config="treeConfig.config" 						
							tree-status="treeConfig.status" 						
							tree-multiple="treeConfig.multiple" 					
							tree-animation="treeConfig.animation" 					
							tree-events="select_node:treeConfig.events.selectNode"  
							tree-data="treeConfig.data" 							
							tree-selected="treeConfig.selected" 					
							tree-types="treeConfig.types" 							
							tree-plugins="treeConfig.plugins" 						
							tree-icons="treeConfig.icons"
							tree-search="treeConfig.search"></div>
					</div>
				</div>
			</div>
		</div>
		<div class="page-right-layout" style="margin-top: 12px;">
			<div class="panel" style="margin-bottom: 0px;">
				<div class="panel-heading">
					<i class="mark"></i>用户查询
				</div>
				<div class="panel-body">
					<form class="form-horizontal" role="form">
						<div class="form-group">
							<div class="col-md-4">
								<input type="text" class="form-control input-sm" ng-model="queryParams.userName" placeholder="姓名:">
							</div>
							<div class="col-md-2">
								<button type="button" class="btn btn-sm btn-blue" ng-click="queryUser();">查询</button>
							</div>
						</div>
					</form>
				</div>
			</div>

			<div class="panel">
				<div class="panel-heading">
					<i class="mark"></i>用户信息
				</div>
				<div class="panel-body" style="padding-top: 0px;">
					<div class="table-responsive">
						<div id="tabletoolbar" class="btn-group">
							<button id="addUserButton" class="btn btn-sm btn-blue" data-toggle="modal" data-target="#userTableEditModal" ng-click="action='ADD_USER'" disabled>
								<i class="glyphicon glyphicon-plus-sign"></i> 新增
							</button>
							<button id="modUserButton" class="btn btn-sm btn-blue" data-toggle="modal" data-target="#userTableEditModal" ng-click="action='MOD_USER'" disabled>
								<i class="glyphicon glyphicon-pencil"></i> 修改
							</button>
							<button id="removeUserButton" class="btn btn-sm btn-blue" ng-click="deleteUser();" disabled>
								<i class="glyphicon glyphicon-remove"></i> 删除
							</button>
						</div>
						<table id="userTable" 
							data-id-field="id"
							data-side-pagination="server"
							data-toolbar="#tabletoolbar" 
							data-row-style="rowStyle"
							data-pagination="true" 
							data-click-to-select="true"
							data-page-size="10"
							data-query-params-type="" 
							data-page-list="[5, 10, 20]">
							<thead>
								<tr>
									<th data-checkbox='true' />
									<th data-field="orgName">部门</th>
									<th data-field="userName">姓名</th>
									<th data-field="phone">手机</th>
									<th data-field="rtx">腾讯通</th>
								</tr>
							</thead>
						</table>
					</div>
				</div>
			</div>
		</div>
		<div>
			<jsp:include page="./user-org-edit.jsp"></jsp:include>
		</div>
		<div>
			<jsp:include page="./user-table-edit.jsp"></jsp:include>
		</div>
	</div>
</body>
</html>